<template>
	<view class="search-container" :style="{'background-color': bgColor}">
		<view class="search" :style="{'border-radius': radius + 'px'}" @click="onclickHandler">
		  <uni-icons type="search" size="16"></uni-icons>
		  <text>搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
    props:{
      bgColor:{
        type: String,
        default: '#00000',
      },
      radius:{
        type: String,
        default:'20'
      }
    },
    methods:{
      onclickHandler(){
       this.$emit("click")
      },
    },
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss">
.search-container{
    background-color: #c00000;
    padding: 10px 0;
    // 吸顶效果
    position: sticky;
    top: 0;
    // 保证其他组件不会把它遮盖
    z-index: 999;
    .search {
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 5px 10px;
      padding: 10px;
      background-color: #FFFFFF;
      // border-radius: 20px;
    }
    
  }
</style>
